package com.smartcar.dto;

import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;

/**
 * 网络配置请求DTO
 */
@Data
public class NetworkConfigRequest {
    
    /**
     * 服务器IP地址
     */
    @NotBlank(message = "IP地址不能为空")
    @Pattern(regexp = "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", 
             message = "IP地址格式不正确")
    private String ip;
    
    /**
     * TCP端口
     */
    @NotNull(message = "TCP端口不能为空")
    private Integer tcpPort;
    
    /**
     * 视频端口
     */
    @NotNull(message = "视频端口不能为空")
    private Integer videoPort;
} 